<?php echo $this->Html->script('JqueryMembership'); ?>
<div class="memberships index">
	<h2><?php echo __('Memberships'); ?></h2>
	<table cellpadding="0" cellspacing="0" id="membership" class="search">
	<thead>
	<tr>
			<th><?php echo $this->Paginator->sort('contact_id'); ?></th>
			<th><?php echo $this->Paginator->sort('date_joined'); ?></th>
			<th><?php echo $this->Paginator->sort('expiry_date'); ?></th>
			<th><?php echo $this->Paginator->sort('renewal_needed'); ?></th>
			<th><?php echo $this->Paginator->sort('amount'); ?></th>
			<th><?php echo $this->Paginator->sort('communication'); ?></th>
			<th class="actions"><?php echo __('Actions'); ?></th>
	</tr>
	</thead>
         	<tbody>
         	<?php
                         if (!empty($donations)){
                             foreach ($donations as $donation):
                         ?>


	<tr>
		<td>
			<?php echo $this->Html->link($membership['Contact']['id'], array('controller' => 'contacts', 'action' => 'view', $membership['Contact']['id'])); ?>
		</td>
		<td>
		<?php echo $this->Html->link($membership['Membership']['date_joined'], array('controller' => 'memberships', 'action' => 'view', $membership['Membership']['id'])); ?>
		</td>
		<td><?php echo h($membership['Membership']['expiry_date']); ?>&nbsp;</td>
		<td><?php echo h($membership['Membership']['renewal_needed']); ?>&nbsp;</td>
		<td><?php echo h($membership['Membership']['amount']); ?>&nbsp;</td>
		<td><?php echo h($membership['Membership']['communication']); ?>&nbsp;</td>
	</tr>
    <?php
                                endforeach;
                            }else{
                            ?>
                            <tr>
                                <td>No Data Found</td>
                            </tr>
                            <?php }?>
	</tbody>
    </table>

	<p>

                	<div class="addbuttons" >
					<ul>
						<li><?php echo $this->Html->link(__('New Membership'), array('controller' => 'memberships', 'action' => 'add')); ?> </li>
					</ul>
					</div>
        	<p>

	<p>
</div>
